<template>
    <div class="container">
        <!--<vue-particles
                color="#dedede"
                :particleOpacity="0.7"
                :particlesNumber="80"
                shapeType="circle"
                :particleSize="4"
                linesColor="#dedede"
                :linesWidth="1"
                :lineLinked="true"
                :lineOpacity="0.4"
                :linesDistance="150"
                :moveSpeed="3"
                :hoverEffect="true"
                hoverMode="grab"
                :clickEffect="true"
                clickMode="push"
        >
        </vue-particles>-->
        <div class="content">
            <img id="star" class="star" src="~@/assets/star.png"  alt="star"/>
            <img class="line" src="~@/assets/line.png" alt="line">
            <div class="list">
                <div class="tab horizon">
                    <span>度数</span>
                    <span class="crosswise"></span>
                    <span>52°</span>
                </div>
                <div class="tab vertical">
                    <span>入库时间</span>
                    <span class="crosswise"></span>
                    <span>2020年2月17日</span>
                </div>


            </div>
        </div>

    </div>
</template>

<script>
    export default {
        name: "index",
        mounted() {
            window.addEventListener('scroll', this.handleScroll)
        },
        methods: {
            handleScroll () {
                let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;

                let offsetTop = document.querySelector('#star').offsetTop;
                console.log(scrollTop, offsetTop)
            },
        }
    }
</script>

<style scoped lang="scss">
    .container{
        position: relative;
        width: 100%;
        height: 200vh;
        overflow: hidden;
        background: url('~@/assets/winebg.jpg') no-repeat;
        .content {
            display: flex;
            flex-direction: row;
            padding-top: 30px;
            .star {
                width: 135px;
                height: 150px;
                position: fixed;
                left: 0;
                // (667-150) / 2
                top: 258.5px;
            }
            .line {
                margin-left: 135px;
                width: 10px;
                height: 100vh;
            }
            .list{
                display: flex;
                flex-direction: column;
                padding: 0 25px 0px 15px;
                .tab {
                    text-align: center;
                    margin-bottom: 50px;
                    display: flex;
                    justify-content: center;
                    border-top: 2px solid #f7b772;
                    border-bottom: 2px solid #f7b772;
                    color: #f5f2f0;
                    font-weight: 600;
                    font-family: "思源黑体Medium","Microsoft YaHei UI", serif;
                }
                .horizon{
                    flex-direction: row;
                    align-content: center;
                    justify-content: center;
                    .crosswise {
                        display: flex;
                        line-height: 50px;
                        width: 6px;
                        height: 6px;
                        border-radius: 2px;
                        background-color: #f7b772;
                    }
                }
                .vertical{
                    width: 190px;
                    height: 50px;
                    flex-direction: column;
                    .crosswise {
                        width: 100%;
                        height: 2px;
                        background-color: #f7b772;
                    }
                }

            }
        }

    }
</style>
